package org.wwb.antbox.user.iservice.userrole;

import org.ant.commons.models.result.BaseResult;
import org.ant.iservice.common.IBaseService;
import org.wwb.antbox.user.model.userrole.entity.SysUserRole;
import org.wwb.antbox.user.model.userrole.model.SysUserRoleAddModel;
import org.wwb.antbox.user.model.userrole.model.SysUserRoleDelModel;
import java.util.List;

/**
 * @Author Bond
 * @Date: 2020/2/23 10:39
 * @Description: 用户角色关系Service
 */
public interface ISysUserRoleService extends IBaseService<SysUserRole, String> {

    /**
     * 获取用户拥有的所有角色Id集合
     * @param userId 用户Id
     * @return BaseResult<List<String>> 角色Id集合
     */
    BaseResult<List<String>> getSysUserRoleIdList(String userId);

    /**
     * 添加用户角色关系
     * @param sysUserRoleAddModel
     * @return BaseResult<String>
     */
    BaseResult<Integer> saveSysUserRole(SysUserRoleAddModel sysUserRoleAddModel);

    /**
     * 删除用户角色关系
     * @param sysUserRoleDelModel
     * @return BaseResult<Integer>
     */
    void delSysUserRole(SysUserRoleDelModel sysUserRoleDelModel);
}
